//
//  ShouHuoDiZhiViewController.m
//  EJLX
//
//  Created by adc on 15/11/18.
//  Copyright © 2015年 江苏一键联信息科技有限公司. All rights reserved.
//

#import "ShouHuoDiZhiViewController.h"
#import "ShouHuoDiZhiTableViewCell.h"
@interface ShouHuoDiZhiViewController ()

@end

@implementation ShouHuoDiZhiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    UIView*view=[[UIView alloc]initWithFrame:CGRectMake(0,20,WIDE, 44)];
    view.backgroundColor=[UIColor greenColor];
    [self.view addSubview:view];
    UIButton*backBut=[[UIButton alloc]initWithFrame:CGRectMake(10,5, 20, 34)];
    [backBut setImage:[UIImage imageNamed:@"返回箭头"] forState:UIControlStateNormal];
    [backBut addTarget:self action:@selector(butClick) forControlEvents:UIControlEventTouchUpInside];
    [view addSubview:backBut];
    UILabel*label=[[UILabel alloc]initWithFrame:CGRectMake(WIDE/2-50, 10,100, 24)];
    label.text=@"收货地址";
    label.textColor=[UIColor whiteColor];
    [view addSubview:label];
    UIButton*baoCun=[[UIButton alloc]initWithFrame:CGRectMake(WIDE-60, 10,40, 24)];
    [baoCun setTitle:@"保存" forState:UIControlStateNormal];
    [baoCun addTarget:self action:@selector(baoCunBut) forControlEvents:UIControlEventTouchUpInside];
    [view addSubview:baoCun];
    UITableView*tableView=[[UITableView alloc]initWithFrame:CGRectMake(0,74,WIDE,176) style:UITableViewStylePlain];
    tableView.delegate=self;
    tableView.dataSource=self;
    tableView.rowHeight=44;
    [self.view addSubview:tableView];
    [tableView registerNib:[UINib nibWithNibName:@"ShouHuoDiZhiTableViewCell" bundle:nil] forCellReuseIdentifier:@"cell"];
    
    
    // Do any additional setup after loading the view from its nib.
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 4;
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    ShouHuoDiZhiTableViewCell*cell=[tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    NSArray*ary=[NSArray arrayWithObjects:@"省份：",@"城市：",@"区县：",@"街道：", nil];
    cell.name.text=ary[indexPath.row];
    NSArray*ary1=[NSArray arrayWithObjects:@"请输入您所在的省份，如：江苏省",@"请输入您所在的城市，如：苏州市",@"请输入您所在的县区，如：姑苏区",@"如：苏站路1599号3-11", nil];
    cell.textField.placeholder=ary1[indexPath.row];
    return cell;
}
-(void)baoCunBut
{
    
}
-(void)butClick
{
    [self.navigationController popViewControllerAnimated:YES];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
